﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using static HarmonyLib.Code;

namespace SZ.Mech
{
    public class HediffGnomon : HediffWithComps
    {
        public Pawn owner;

        public override void PostTick()
        {
            base.PostTick();
            if (owner.Map != this.pawn.Map|| owner.Faction!= this.pawn.Faction)
            {
                this.pawn.health.RemoveHediff(this);
            }
        }

        public override void ExposeData()
        {
            base.ExposeData();
            Scribe_References.Look(ref owner, "owner");
        }
    }
}